﻿using ShiQuan.IotDevice.Entity;
using ShiQuan.Utility;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;

namespace ShiQuan.IotDevice.Business
{
    /// <summary>
    /// 设备供货商业务处理
    /// </summary>
    public class SupplierInfoBLL:BaseIotDeviceBLL<SupplierInfoEntity>
    {
        /// <summary>
        /// 查询过滤
        /// </summary>
        /// <param name="expression"></param>
        /// <param name="queryJson"></param>
        /// <returns></returns>
        protected override Expression<Func<SupplierInfoEntity, bool>> QueryStringToExpression(Expression<Func<SupplierInfoEntity, bool>> expression, string queryJson)
        {
            if (string.IsNullOrEmpty(queryJson))
                return expression;
            var queryParam = queryJson.ToJObject();
            if (!queryParam["condition"].IsEmpty() && !queryParam["keyword"].IsEmpty())
            {
                string condition = queryParam["condition"].ToString();
                string keyword = queryParam["keyword"].ToString();
                switch (condition)
                {
                    default: break;
                }
            }
            return expression;
        }
    }
}
